package Inherit.abstractClasses;

import java.time.LocalDate;

public class Employee extends Person{
    private double salary;
    private LocalDate hireDay;

    public Employee(String name,double salary,int year,int month,int day) {
        super(name);
        this.salary=salary;
        this.hireDay=LocalDate.of(year,month,day);
    }

    public double getSalary() {
        return salary;
    }

    public LocalDate getHireDay() {
        return hireDay;
    }

    @Override
    public String getDescription() {
        return String.format("An Employee with a salary of $%.2f",salary);
    }

    public void rasieSalary(double byPercent){
        salary+=salary*byPercent/100;
    }
}
